Method and apparatus for data efficient semantic segmentation

ABSTRACT

A method and system for training a neural network are provided. The method includes receiving an input image, selecting at least one data augmentation method from a pool of data augmentation methods, generating an augmented image by applying the selected at least one data augmentation method to the input image, and generating a mixed image from the input image and the augmented image.

PRIORITY

This application is a Continuation Application of U.S. application Ser.No. 17/241,848, filed in the U.S. Patent and Trademark Office on Apr.27, 2021, which is based on and claims priority under 35 U.S.C. § 119(e)to U.S. Provisional Patent Application Ser. No. 63/047,438, filed onJul. 2, 2020, the entire contents of which are incorporated herein byreference.

FIELD

The present disclosure is generally related to a system and method fordata efficient semantic segmentation.

BACKGROUND

There have been attempts to address the issue of lack of training databy data augmentation for image classification, such as Augmix, Mixupetc. However, it is not trivial to extend those works to the area ofsemantic segmentation since it is a position sensitive task that itneeds careful consideration of changing the labels when image isaugmented.

SUMMARY

According to one embodiment, a method for training a neural networkincludes receiving an input image, selecting at least one dataaugmentation method from a pool of data augmentation methods, generatingan augmented image by applying the selected at least one dataaugmentation method to the input image, and generating a mixed imagefrom the input image and the augmented image.

According to one embodiment, a system for training a neural networkincludes a memory and a processor configured to receive an input image,select at least one data augmentation method from a pool of dataaugmentation methods, generate an augmented image by applying theselected at least one data augmentation method to the input image, andgenerate a mixed image from the input image and the augmented image.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features, and advantages of certainembodiments of the present disclosure will be more apparent from thefollowing detailed description, taken in conjunction with theaccompanying drawings, in which:

FIG. 1 illustrates a diagram of an architecture of high resolutionnetwork V2 (HRNet V2), according to an embodiment;

FIG. 2 illustrates a diagram of an architecture for object contextualrepresentation (OCR), according to an embodiment;

FIG. 3 illustrates a diagram of a scheme for image classification,according to an embodiment;

FIG. 4 illustrates a diagram of a seg-Augmix architecture, according toan embodiment;

FIG. 5 illustrates a diagram of a frequency weighted (FW) model ensemblemethod, according to an embodiment;

FIG. 6 illustrates a flowchart for a method of training a neuralnetwork, according to an embodiment; and

FIG. 7 illustrates a block diagram of an electronic device in a networkenvironment, according to one embodiment.

DETAILED DESCRIPTION

Hereinafter, embodiments of the present disclosure are described indetail with reference to the accompanying drawings. It should be notedthat the same elements will be designated by the same reference numeralsalthough they are shown in different drawings. In the followingdescription, specific details such as detailed configurations andcomponents are merely provided to assist with the overall understandingof the embodiments of the present disclosure. Therefore, it should beapparent to those skilled in the art that various changes andmodifications of the embodiments described herein may be made withoutdeparting from the scope of the present disclosure. In addition,descriptions of well-known functions and constructions are omitted forclarity and conciseness. The terms described below are terms defined inconsideration of the functions in the present disclosure, and may bedifferent according to users, intentions of the users, or customs.Therefore, the definitions of the terms should be determined based onthe contents throughout this specification.

The present disclosure may have various modifications and variousembodiments, among which embodiments are described below in detail withreference to the accompanying drawings. However, it should be understoodthat the present disclosure is not limited to the embodiments, butincludes all modifications, equivalents, and alternatives within thescope of the present disclosure.

Although the terms including an ordinal number such as first, second,etc. may be used for describing various elements, the structuralelements are not restricted by the terms. The terms are only used todistinguish one element from another element. For example, withoutdeparting from the scope of the present disclosure, a first structuralelement may be referred to as a second structural element. Similarly,the second structural element may also be referred to as the firststructural element. As used herein, the term “and/or” includes any andall combinations of one or more associated items.

The terms used herein are merely used to describe various embodiments ofthe present disclosure but are not intended to limit the presentdisclosure. Singular forms are intended to include plural forms unlessthe context clearly indicates otherwise. In the present disclosure, itshould be understood that the terms “include” or “have” indicateexistence of a feature, a number, a step, an operation, a structuralelement, parts, or a combination thereof, and do not exclude theexistence or probability of the addition of one or more other features,numerals, steps, operations, structural elements, parts, or combinationsthereof.

Unless defined differently, all terms used herein have the same meaningsas those understood by a person skilled in the art to which the presentdisclosure belongs. Terms such as those defined in a generally useddictionary are to be interpreted to have the same meanings as thecontextual meanings in the relevant field of art, and are not to beinterpreted to have ideal or excessively formal meanings unless clearlydefined in the present disclosure.

The electronic device according to one embodiment may be one of varioustypes of electronic devices. The electronic devices may include, forexample, a portable communication device (e.g., a smart phone), acomputer, a portable multimedia device, a portable medical device, acamera, a wearable device, or a home appliance. According to oneembodiment of the disclosure, an electronic device is not limited tothose described above.

The terms used in the present disclosure are not intended to limit thepresent disclosure but are intended to include various changes,equivalents, or replacements for a corresponding embodiment. With regardto the descriptions of the accompanying drawings, similar referencenumerals may be used to refer to similar or related elements. A singularform of a noun corresponding to an item may include one or more of thethings, unless the relevant context clearly indicates otherwise. As usedherein, each of such phrases as “A or B,” “at least one of A and B,” “atleast one of A or B,” “A, B, or C,” “at least one of A, B, and C,” and“at least one of A, B, or C,” may include all possible combinations ofthe items enumerated together in a corresponding one of the phrases. Asused herein, terms such as “1^(st),” “2nd,” “first,” and “second” may beused to distinguish a corresponding component from another component,but are not intended to limit the components in other aspects (e.g.,importance or order). It is intended that if an element (e.g., a firstelement) is referred to, with or without the term “operatively” or“communicatively”, as “coupled with,” “coupled to,” “connected with,” or“connected to” another element (e.g., a second element), it indicatesthat the element may be coupled with the other element directly (e.g.,wired), wirelessly, or via a third element.

As used herein, the term “module” may include a unit implemented inhardware, software, or firmware, and may interchangeably be used withother terms, for example, “logic,” “logic block,” “part,” and“circuitry.” A module may be a single integral component, or a minimumunit or part thereof, adapted to perform one or more functions. Forexample, according to one embodiment, a module may be implemented in aform of an application-specific integrated circuit (ASIC).

Semantic segmentation refers to the task of predicting the class of eachpixel in the image. The present disclosure focuses on the scenarioswhere the labeled semantic segmentation training dataset is relativelysmall.

In some systems of semantic segmentation that mainly focus on betternetwork architecture design, the data efficiency problem is ignored. Butin practice, many areas have only limited amount of labeled trainingdataset. In particular, it requires a significant amount of human effortto label the semantic segmentation training dataset. The present systemand method include a novel Augmix based data augmentation techniques byextending Augmix to the area of semantic segmentation, referred to as“seg-Augmix”, to improve the performance of training under suchscenarios when training dataset is small.

Some systems of semantic segmentation simply adopted an average ensemblemethod. The properties of the models to be put into an ensemble are notconsidered. The present system and method ensemble the models based onthe per class performance. Specifically, the strength of each model isanalyzed and more weights are assigned to classes that have betterperformance in the output logits of each model.

Disclosed herein is a semantic segmentation system that is able toachieve desired performance with a limited training dataset. First, thesystem applies seg-Augmix to preprocess the training dataset so that thesemantic segmentation network has more available data to be trained. Theseg-Augmix removed the data augmentation techniques used in Augmix thatare position sensitive, such as shift, shear, etc., and maintains a poolof data augmentation methods. Then, the system applies a number ofrandomly chosen data augmentation methods from the pool to each batchduring the training to generate the augmented images without changingthe labels. Those augmented images may be mixed with the original image.The system then applies a Jensen-Shannon divergence consistency lossbetween the original image and the mixed image to prevent theinstability of the training.

The present disclosure provides the techniques used based on the HRNetV2 and OCR.

First, a baseline HRNet V2-W48+OCR is learned using proper colorjittering data augmentation, then it is fine-tuned with OHEM to addressdata imbalance using the training dataset and validation dataset. Toevaluate the performance on test dataset, the system fine-tunes thelearned baseline model using both training and validation dataset, anduses the ensemble model by the classwise Ensemble-Combining (EC) methodto evaluate on the test dataset for submission to the officialevaluation serve.

Second, several HRNet V2 variants, such as HRNet V2-W64 and HRNet V2-W32with different complexities, are also used to learn a good model forensemble prediction.

Third, advanced data augmentation techniques, such as seg-Augmix, arealso applied to further improve performance. The system ports to thesemantic segmentation by removing those position sensitive dataaugmentation techniques used in the original Augmix.

FIG. 1 illustrates a diagram of an architecture of HRNet V2, accordingto an embodiment. The key idea of HRNet V2 is to maintain the highresolution of the feature map since dense pixel prediction tasks such assemantic segmentation, depth estimation, may benefit from the higherresolution of feature map. Meanwhile, the multiple scale feature fusionis another important aspect for HRNet V2 to improve the performance ofsemantic segmentation. In addition to fusing the multiple scale featuresat the end of the backbone, HRNet V2 also fuses multiple scales in themiddle of the backbone whenever down sampling happens.

FIG. 2 illustrates a diagram of an architecture for OCR, according to anembodiment. The key idea of OCR is to model the object level contextinformation for each pixel. Specifically, the object level context ofeach pixel is defined as a weighted combination of object regionfeature, whose weights are determined by the similarities between thefeature at the pixel and the feature of object region.

For data augmentation, deep convolutional neural networks benefit whenlabeled data are abundant, yet their performance degrades substantiallywhen provided with limited supervision. Improving the generalizationability of these models in low data regimes is one of the most difficultchallenges. Models with poor generalizability overfit the training data.Data augmentation is a very powerful method to address this challenge.The augmented data will represent a more comprehensive set of possibledata points, thus minimizing the distance between the training and anyfuture testing sets.

To achieve this goal, the system and method uses a combination of Augmixand Mixup for image classification. The goal of combining Augmix andMixup for image classification is to combine the benefits of bothapproaches as Augmix focuses on within-class data diversification, whileMixup benefits from the between-class data diversification.

Without loss of generality, a multi-class (K class) classificationproblem is considered as the running task example. The joint space ofinputs and classes labels are X x

, where X=

^(d) and

={1, . . . , K} for (K way) classification.

is the probability distribution of the data points on the joint space.The system may learn a classifier f_(θ): X→

with parameter θ, using the optimization problem, as in Equation (1):

θ * = arg ⁢ min θ ⁢ ( x , y ) ~ 𝒫 𝓍 × 𝓎 [ ℒ cls ( f θ ( x ) , y ) + γℒ js( f θ ( x ) , f θ ( x ′ ) , f θ ( x ″ ) ) ] + ( 1 )β𝔼_(λ ∼ Beta(α))[ℒ_(cls)f_(θ)(λx₁ + (1 − λ)x₂), (λy₁ + (1 − λ)y₂

where

denotes the expectation operator,

_(cls) denotes the standard cross entropy loss, x′ and x″ are twoaugmentations of x, α, β, and γ are the hyperparameters, and

_(js) is the Jensen-Shannon divergence between the classifier output ofthe original sample x and its augmentations x′ and x″.

Since the semantic content of an image is approximately preserved withAugmix augmentation, with

_(js), the classifier f is maps x, x′ and x″ close to each other in theoutput space. This is performed by first obtaining

=(f_(θ)(x), f_(θ)(x′), f_(θ)(x″))/3, and then determining the result ofEquation (2):

$\begin{matrix}{{\mathcal{L}_{js}\left( {{f_{\theta}(x)},{f_{\theta}\left( x^{\prime} \right)},{f_{\theta}\left( x^{''} \right)}} \right)} = {\frac{1}{3}\left( {{{KL}\left\lbrack {{f_{\theta}(x)};} \right\rbrack} + {{KL}\left\lbrack {{f_{\theta}\left( x^{\prime} \right)};} \right\rbrack} + {{KL}\left\lbrack {{f_{\theta}\left( x^{''} \right)};} \right\rbrack}} \right.}} & (2)\end{matrix}$

where KL[p;q] denotes the KL divergence between two probability vectorsp and q (note that the output of the classifier f is a C dimensionalprobability vector). The optimization of Equations (1) and (2) may besolved with stochastic gradient descent (SDG) by approximating theexpectation with sample averages.

FIG. 3 illustrates a diagram of a scheme for image classification,according to an embodiment. In FIG. 3 , each batch of images 302 goesthrough two types of augmentation pipelines. First, the images 302 arelinearly combined to create mixup images. Augmix data augmentation isapplied twice on each image to create augmix images. Then, all theaugmented (mixup, augmix) images along with the original images are fedinto the classification network 304 to produce class probability output.The cross entropy loss is applied on the original image network outputsand the mixup image network outputs. The Jensen-Shannon divergence lossis also applied on the original image network outputs and the augmiximage network outputs.

FIG. 4 illustrates a diagram of a seg-Augmix architecture, according toan embodiment. The seg-Augmix architecture includes an original inputimage 402 and a data augmentation pool 404. The seg-Augmix architecturemaintains a pool 404 of data augmentation methods, randomly selects adata augmentation method from the pool to be applied to each batchduring training to generate augmented images without changing thelabels, where the augmented images are mixed with the original image402, and then applies the Jensen-Shannon divergence consistency betweenthe original image 402 and the mixed image 406 to prevent instability ofthe training.

Specifically, the data augmentation method pool may includeautocontrast, equalize, posterize, solarize, color, contrast, brightnessand sharpness data augmentation techniques. Those methods onlymanipulate the pixel values rather than changing the position of theregions so that the ground truth segmentation map will not be changed.The “None” operation refers to no data augmentation method beingapplied.

When applying the selected data augmentation method, twohyperparameters, namely the mixture width M_(w), and mixture depth M_(d)will be defined first. Mixture width defines the number of branches forgenerating the augmented images, and mixture depth defines maximumnumber of consecutive data augmentations. As an example illustrated inFIG. 4 , mixture width M_(w)=3 and mixture depth M_(d)=3. The mixtureweights may be randomly generated from a Dirichlet distribution for eachbranch i. f_(i) ^((M) ^(d) ⁾(x) is denoted as applying the dataaugmentation function ƒ for j times sequentially for branch i, wherej∈{1, 2, . . . , M_(d)} is a randomly generated integer that is lessthan mixture depth M_(d) for branch i. The final combination with theoriginal image may use the weights generated from a Beta distribution.In the example shown in FIG. 4 , the dashed data augmentation boxesindicate that the “None” augmentation method was selected (i.e., no dataaugmentation was applied).

The generated augmented image I_(aug), and the generated mixed imageI_(mix) are defined as in Equations (3) and (4).

$\begin{matrix}{{I_{aug} = {\sum\limits_{i = 1}^{M_{w}}{w_{i}{f_{i}^{(j)}\left( I_{orig} \right)}}}},{j \in \left\{ {1,2,\ldots,M_{d}} \right\}}} & (3)\end{matrix}$ $\begin{matrix}{I_{mix} = {{\left( {1 - m} \right)*I_{aug}} + {m*I_{orig}}}} & (4)\end{matrix}$

Then, the system generates two mixed images, and feeds the originalimage as well as the two mixed images to the network to generate threesoftmax logits, p_(orig), p_(mix1), and p_(mix2). The additionalJensen-Shannon Divergence Consistency is defined in Equations (5) and(6):

$\begin{matrix}{{{JS}\left( {p_{orig},p_{{mix}1},p_{{mix}2}} \right)} = {\frac{1}{3}\left( {{{KL}\left\lbrack {p_{orig} \parallel M} \right\rbrack} + {{KL}\left\lbrack {p_{{mix}1} \parallel M} \right\rbrack} + {{KL}\left\lbrack {p_{{mix}2} \parallel M} \right\rbrack}} \right)}} & (5)\end{matrix}$ $\begin{matrix}{M = {\frac{1}{3}\left( {p_{orig} + p_{{mix}1} + p_{{mix}2}} \right)}} & (6)\end{matrix}$

where KL[x∥y] defines the KL divergence between x and y.

Test-time augmentation (TTA) is an application of data augmentation tothe test dataset. It involves creating multiple augmented copies of eachimage in the test set, having the model make a prediction for each, thenreturning an ensemble of those predictions. A single simple TTA may beperformed by randomly cropping the test image 10 times, making aprediction for each, and then returning an ensemble average of thosepredictions.

An FW model ensemble method (or classwise Ec method) may be appliedinstead of the average model ensemble method to improve the performance.First, the system may train an online hard example mining (OHEM) basedversion for each model based on an observation that the training datasetis imbalanced. The per-class performance indicates that the OHEM modelperforms better at low frequency classes, while the original modelperforms well at higher frequency models. The seg_Augmix based model canalso improve the performance of low frequency classes due to theapplication of data augmentation. Higher weights may be applied to thoseclasses. The system may assign more weights for low frequency classesfor output logits for the OHEM model and the seg-Augmix model, whenassembling them with the output logit of the original model.

For the OHEM and seg-Augmix models, the logits may be combined such thatthe low frequency classes will have higher weights. Assume the outputsoftmax logits of the i-th model is l_(i)∈R^(H×W×C), i=1, 2, . . . K,w_(i)∈R^(C) is the per class weights for all the C classes, dup(x),x∈R^(C) is the operation that duplicates of the value of each channel inx to H×W, this will return a size of R^(H×W×C), then the predictedsegmentation map of model ensemble will be as follows given thanargmax(x, axis) will take the argmax of x along the axis, as in Equation(7)

$\begin{matrix}{{seg} = {\arg{\max\left( {{\sum\limits_{i}{l_{i}{{dup}\left( w_{i} \right)}}},{{axis} = {- 1}}} \right)}}} & (7)\end{matrix}$

As a result, if w_(i)=w_(j) for all the i≠j, then it is the equalweights ensemble for all the models. If model j performs better thanmodel i, then we will have w_(i)<w_(j) when it is using higher weightsfor better model. If model j performs better than model i in class c,w_(ic)<w_(jc) when it is using higher per class-weights for modelsperforming better on this class.

FIG. 5 illustrates a diagram of an FW model ensemble method, accordingto an embodiment. For each model in the set of models 502, logitensembles 504 are output based on the per-class performance where thebetter performance classes have higher weights. The output logitensembles are further combined to produce logit ensemble 506.

FIG. 6 illustrates a flowchart 600 for a method of training a neuralnetwork, according to an embodiment. At 602, the system receives aninput image. At 604, the system selects at least one data augmentationmethod from a pool of data augmentation methods. At 606, the systemgenerates an augmented image by applying the selected at least one dataaugmentation method to the input image. At 608, the system generates amixed image from the input image and the augmented image.

FIG. 7 illustrates a block diagram of an electronic device 701 in anetwork environment 700, according to one embodiment. Referring to FIG.7 , the electronic device 701 in the network environment 700 maycommunicate with an electronic device 702 via a first network 798 (e.g.,a short-range wireless communication network), or an electronic device704 or a server 708 via a second network 799 (e.g., a long-rangewireless communication network). The electronic device 701 maycommunicate with the electronic device 704 via the server 708. Theelectronic device 701 may include a processor 720, a memory 730, aninput device 750, a sound output device 755, a display device 760, anaudio module 770, a sensor module 776, an interface 777, a haptic module779, a camera module 780, a power management module 788, a battery 789,a communication module 790, a subscriber identification module (SIM)796, or an antenna module 797. In one embodiment, at least one (e.g.,the display device 760 or the camera module 780) of the components maybe omitted from the electronic device 701, or one or more othercomponents may be added to the electronic device 701. In one embodiment,some of the components may be implemented as a single integrated circuit(IC). For example, the sensor module 776 (e.g., a fingerprint sensor, aniris sensor, or an illuminance sensor) may be embedded in the displaydevice 760 (e.g., a display).

The processor 720 may execute, for example, software (e.g., a program740) to control at least one other component (e.g., a hardware or asoftware component) of the electronic device 701 coupled with theprocessor 720, and may perform various data processing or computations.As at least part of the data processing or computations, the processor720 may load a command or data received from another component (e.g.,the sensor module 776 or the communication module 790) in volatilememory 732, process the command or the data stored in the volatilememory 732, and store resulting data in non-volatile memory 734. Theprocessor 720 may include a main processor 721 (e.g., a centralprocessing unit (CPU) or an application processor (AP)), and anauxiliary processor 723 (e.g., a graphics processing unit (GPU), animage signal processor (ISP), a sensor hub processor, or a communicationprocessor (CP)) that is operable independently from, or in conjunctionwith, the main processor 721. Additionally or alternatively, theauxiliary processor 723 may be adapted to consume less power than themain processor 721, or execute a particular function. The auxiliaryprocessor 723 may be implemented as being separate from, or a part of,the main processor 721.

The auxiliary processor 723 may control at least some of the functionsor states related to at least one component (e.g., the display device760, the sensor module 776, or the communication module 790) among thecomponents of the electronic device 701, instead of the main processor721 while the main processor 721 is in an inactive (e.g., sleep) state,or together with the main processor 721 while the main processor 721 isin an active state (e.g., executing an application). According to oneembodiment, the auxiliary processor 723 (e.g., an image signal processoror a communication processor) may be implemented as part of anothercomponent (e.g., the camera module 780 or the communication module 790)functionally related to the auxiliary processor 723.

The memory 730 may store various data used by at least one component(e.g., the processor 720 or the sensor module 776) of the electronicdevice 701. The various data may include, for example, software (e.g.,the program 740) and input data or output data for a command relatedthereto. The memory 730 may include the volatile memory 732 or thenon-volatile memory 734.

The program 740 may be stored in the memory 730 as software, and mayinclude, for example, an operating system (OS) 742, middleware 744, oran application 746.

The input device 750 may receive a command or data to be used by othercomponent (e.g., the processor 720) of the electronic device 701, fromthe outside (e.g., a user) of the electronic device 701. The inputdevice 750 may include, for example, a microphone, a mouse, or akeyboard.

The sound output device 755 may output sound signals to the outside ofthe electronic device 701. The sound output device 755 may include, forexample, a speaker or a receiver. The speaker may be used for generalpurposes, such as playing multimedia or recording, and the receiver maybe used for receiving an incoming call. According to one embodiment, thereceiver may be implemented as being separate from, or a part of, thespeaker.

The display device 760 may visually provide information to the outside(e.g., a user) of the electronic device 701. The display device 760 mayinclude, for example, a display, a hologram device, or a projector andcontrol circuitry to control a corresponding one of the display,hologram device, and projector. According to one embodiment, the displaydevice 760 may include touch circuitry adapted to detect a touch, orsensor circuitry (e.g., a pressure sensor) adapted to measure theintensity of force incurred by the touch.

The audio module 770 may convert a sound into an electrical signal andvice versa. According to one embodiment, the audio module 770 may obtainthe sound via the input device 750, or output the sound via the soundoutput device 755 or a headphone of an external electronic device 702directly (e.g., wired) or wirelessly coupled with the electronic device701.

The sensor module 776 may detect an operational state (e.g., power ortemperature) of the electronic device 701 or an environmental state(e.g., a state of a user) external to the electronic device 701, andthen generate an electrical signal or data value corresponding to thedetected state. The sensor module 776 may include, for example, agesture sensor, a gyro sensor, an atmospheric pressure sensor, amagnetic sensor, an acceleration sensor, a grip sensor, a proximitysensor, a color sensor, an infrared (IR) sensor, a biometric sensor, atemperature sensor, a humidity sensor, or an illuminance sensor.

The interface 777 may support one or more specified protocols to be usedfor the electronic device 701 to be coupled with the external electronicdevice 702 directly (e.g., wired) or wirelessly. According to oneembodiment, the interface 777 may include, for example, a highdefinition multimedia interface (HDMI), a universal serial bus (USB)interface, a secure digital (SD) card interface, or an audio interface.

A connecting terminal 778 may include a connector via which theelectronic device 701 may be physically connected with the externalelectronic device 702. According to one embodiment, the connectingterminal 778 may include, for example, an HDMI connector, a USBconnector, an SD card connector, or an audio connector (e.g., aheadphone connector).

The haptic module 779 may convert an electrical signal into a mechanicalstimulus (e.g., a vibration or a movement) or an electrical stimuluswhich may be recognized by a user via tactile sensation or kinestheticsensation. According to one embodiment, the haptic module 779 mayinclude, for example, a motor, a piezoelectric element, or an electricalstimulator.

The camera module 780 may capture a still image or moving images.According to one embodiment, the camera module 780 may include one ormore lenses, image sensors, image signal processors, or flashes.

The power management module 788 may manage power supplied to theelectronic device 701. The power management module 788 may beimplemented as at least part of, for example, a power managementintegrated circuit (PMIC).

The battery 789 may supply power to at least one component of theelectronic device 701. According to one embodiment, the battery 789 mayinclude, for example, a primary cell which is not rechargeable, asecondary cell which is rechargeable, or a fuel cell.

The communication module 790 may support establishing a direct (e.g.,wired) communication channel or a wireless communication channel betweenthe electronic device 701 and the external electronic device (e.g., theelectronic device 702, the electronic device 704, or the server 708) andperforming communication via the established communication channel. Thecommunication module 790 may include one or more communicationprocessors that are operable independently from the processor 720 (e.g.,the AP) and supports a direct (e.g., wired) communication or a wirelesscommunication. According to one embodiment, the communication module 790may include a wireless communication module 792 (e.g., a cellularcommunication module, a short-range wireless communication module, or aglobal navigation satellite system (GNSS) communication module) or awired communication module 794 (e.g., a local area network (LAN)communication module or a power line communication (PLC) module). Acorresponding one of these communication modules may communicate withthe external electronic device via the first network 798 (e.g., ashort-range communication network, such as Bluetooth™, wireless-fidelity(Wi-Fi) direct, or a standard of the Infrared Data Association (IrDA))or the second network 799 (e.g., a long-range communication network,such as a cellular network, the Internet, or a computer network (e.g.,LAN or wide area network (WAN)). These various types of communicationmodules may be implemented as a single component (e.g., a single IC), ormay be implemented as multiple components (e.g., multiple ICs) that areseparate from each other. The wireless communication module 792 mayidentify and authenticate the electronic device 701 in a communicationnetwork, such as the first network 798 or the second network 799, usingsubscriber information (e.g., international mobile subscriber identity(IMSI)) stored in the subscriber identification module 796.

The antenna module 797 may transmit or receive a signal or power to orfrom the outside (e.g., the external electronic device) of theelectronic device 701. According to one embodiment, the antenna module797 may include one or more antennas, and, therefrom, at least oneantenna appropriate for a communication scheme used in the communicationnetwork, such as the first network 798 or the second network 799, may beselected, for example, by the communication module 790 (e.g., thewireless communication module 792). The signal or the power may then betransmitted or received between the communication module 790 and theexternal electronic device via the selected at least one antenna.

At least some of the above-described components may be mutually coupledand communicate signals (e.g., commands or data) therebetween via aninter-peripheral communication scheme (e.g., a bus, a general purposeinput and output (GPIO), a serial peripheral interface (SPI), or amobile industry processor interface (MIPI)).

According to one embodiment, commands or data may be transmitted orreceived between the electronic device 701 and the external electronicdevice 704 via the server 708 coupled with the second network 799. Eachof the electronic devices 702 and 704 may be a device of a same type as,or a different type, from the electronic device 701. All or some ofoperations to be executed at the electronic device 701 may be executedat one or more of the external electronic devices 702, 704, or 708. Forexample, if the electronic device 701 should perform a function or aservice automatically, or in response to a request from a user oranother device, the electronic device 701, instead of, or in additionto, executing the function or the service, may request the one or moreexternal electronic devices to perform at least part of the function orthe service. The one or more external electronic devices receiving therequest may perform the at least part of the function or the servicerequested, or an additional function or an additional service related tothe request, and transfer an outcome of the performing to the electronicdevice 701. The electronic device 701 may provide the outcome, with orwithout further processing of the outcome, as at least part of a replyto the request. To that end, a cloud computing, distributed computing,or client-server computing technology may be used, for example.

One embodiment may be implemented as software (e.g., the program 740)including one or more instructions that are stored in a storage medium(e.g., internal memory 736 or external memory 738) that is readable by amachine (e.g., the electronic device 701). For example, a processor ofthe electronic device 701 may invoke at least one of the one or moreinstructions stored in the storage medium, and execute it, with orwithout using one or more other components under the control of theprocessor. Thus, a machine may be operated to perform at least onefunction according to the at least one instruction invoked. The one ormore instructions may include code generated by a complier or codeexecutable by an interpreter. A machine-readable storage medium may beprovided in the form of a non-transitory storage medium. The term“non-transitory” indicates that the storage medium is a tangible device,and does not include a signal (e.g., an electromagnetic wave), but thisterm does not differentiate between where data is semi-permanentlystored in the storage medium and where the data is temporarily stored inthe storage medium.

According to one embodiment, a method of the disclosure may be includedand provided in a computer program product. The computer program productmay be traded as a product between a seller and a buyer. The computerprogram product may be distributed in the form of a machine-readablestorage medium (e.g., a compact disc read only memory (CD-ROM)), or bedistributed (e.g., downloaded or uploaded) online via an applicationstore (e.g., Play Store™), or between two user devices (e.g., smartphones) directly. If distributed online, at least part of the computerprogram product may be temporarily generated or at least temporarilystored in the machine-readable storage medium, such as memory of themanufacturer's server, a server of the application store, or a relayserver.

According to one embodiment, each component (e.g., a module or aprogram) of the above-described components may include a single entityor multiple entities. One or more of the above-described components maybe omitted, or one or more other components may be added. Alternativelyor additionally, a plurality of components (e.g., modules or programs)may be integrated into a single component. In this case, the integratedcomponent may still perform one or more functions of each of theplurality of components in the same or similar manner as they areperformed by a corresponding one of the plurality of components beforethe integration. Operations performed by the module, the program, oranother component may be carried out sequentially, in parallel,repeatedly, or heuristically, or one or more of the operations may beexecuted in a different order or omitted, or one or more otheroperations may be added.

Although certain embodiments of the present disclosure have beendescribed in the detailed description of the present disclosure, thepresent disclosure may be modified in various forms without departingfrom the scope of the present disclosure. Thus, the scope of the presentdisclosure shall not be determined merely based on the describedembodiments, but rather determined based on the accompanying claims andequivalents thereto.

What is claimed is:
 1. A method for training a neural network,comprising receiving an input image; selecting at least one dataaugmentation method from a pool of data augmentation methods; generatingan augmented image by applying the selected at least one dataaugmentation method to the input image; and generating a mixed imagefrom the input image and the augmented image.
 2. The method of claim 1,further comprising performing Jensen-Shannon divergence consistencybetween the input image and the generated mixed image.
 3. The method ofclaim 1, wherein the pool of augmentation methods includes at least oneof an autocontrast data augmentation method, an equalize dataaugmentation method, a posterize data augmentation method, a solarizedata augmentation method, a color data augmentation method, a contrastdata augmentation method, a brightness data augmentation method, and asharpness data augmentation method.
 4. The method of claim 1, whereinthe selected at least one data augmentation method is randomly selected.5. The method of claim 1, further comprising generating softmax logitscorresponding to the input image and the generated mixed image.
 6. Themethod of claim 1, wherein applying the selected at least one dataaugmentation method includes defining a mixture width as a number ofbranches for generating the augmented image.
 7. The method of claim 6,wherein applying the selected at least one data augmentation methodincludes defining a mixture depth as a maximum number of consecutivedata augmentations for generating the augmented image.
 8. The method ofclaim 7, wherein the mixture width and mixture length are randomlygenerated from a Dirichlet distribution for each branch of the number ofbranches.
 9. The method of claim 1, further comprising classifying theinput image based on a combination of an Augmix data augmentationtechnique and a Mixup.data augmentation technique.
 10. The method ofclaim 9, further comprising applying a cross entropy loss to the inputimage.
 11. A system for training a neural network, comprising: a memory;and a processor configured to: receive an input image; select at leastone data augmentation method from a pool of data augmentation methods;generate an augmented image by applying the selected at least one dataaugmentation method to the input image; and generate a mixed image fromthe input image and the augmented image.
 12. The system of claim 11,wherein the processor is further configured to perform Jensen-Shannondivergence consistency between the input image and the generated mixedimage.
 13. The system of claim 11, wherein the pool of augmentationmethods includes at least one of an autocontrast data augmentationmethod, an equalize data augmentation method, a posterize dataaugmentation method, a solarize data augmentation method, a color dataaugmentation method, a contrast data augmentation method, a brightnessdata augmentation method, and a sharpness data augmentation method. 14.The system of claim 11, wherein the selected at least one dataaugmentation method is randomly selected.
 15. The system of claim 11,wherein the processor is further configured to generate softmax logitscorresponding to the input image and the generated mixed image.
 16. Thesystem of claim 11, wherein applying the selected at least one dataaugmentation method includes defining a mixture width as a number ofbranches for generating the augmented image.
 17. The system of claim 16,wherein applying the selected at least one data augmentation methodincludes defining a mixture depth as a maximum number of consecutivedata augmentations for generating the augmented image.
 18. The system ofclaim 17, wherein the mixture width and mixture length are randomlygenerated from a Dirichlet distribution for each branch of the number ofbranches.
 19. The system of claim 11, wherein the processor is furtherconfigured to classify the input image based on a combination of anAugmix data augmentation technique and a Mixup.data augmentationtechnique.
 20. The system of claim 19, wherein the processor is furtherconfigured to apply a cross entropy loss to the input image.